package Test.JVM.OOM;

/**
 * @author pengshuai
 * @date 2022/4/12 23:44
 */
public class JavaVMStackSOF3 {


    private void dontStop() {
        while (true) {
        }
    }

    public void stackLeakByThread() {
        while (true) {
            new Thread(this::dontStop).start();
        }
    }

    public static void main(String[] args) {
        JavaVMStackSOF3 javaVMStackSOF3 = new JavaVMStackSOF3();
        javaVMStackSOF3.stackLeakByThread();
    }

}
